package org.example.ims.Service.Base;

import org.example.ims.Entity.Base.Salesman;
import org.springframework.data.domain.Page;

import java.util.Optional;

public interface SalesmanService {
    Salesman createSalesman(Salesman salesman);

    // 获取所有销售员（带分页）
    Page<Salesman> getAllSalesmen(Integer page, Integer size);

    Page<Salesman> searchSalesmen(String name, String department, Integer page, Integer size);

    Optional<Salesman> getSalesmanById(Integer id);

    void deleteSalesman(Integer id);

    // 根据名称获取销售员
    Salesman getSalesmanByName(String name);

    Salesman updateSalesman(Integer id, Salesman salesmanDetails);
}
